﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="InsuranceAdd.aspx.cs" Inherits="VehicleUI_Insurance_InsuranceAdd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>无标题页</title>

    <script src="../../JavaScript/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    
             <script src="../../JavaScript/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="../../JavaScript/jquery-ui.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="../../CSS/jquery-ui.css" />
        
        
        <script type="text/javascript">
            $(document).ready(function() {

                //车牌号自动下拉
                $("#txt_VehicleID").autocomplete({ source: "../../ashx/autocomplete.ashx" });

                //判断是否存在该车
                $("#txt_VehicleID").blur(function() {

                    $.get("../../ashx/validate.ashx", { ID: $("#txt_VehicleID").val() }, function(data, status) {
                        if (data == "") {
                            alert("不存在该车信息,请重新录入车牌号或车架号!");
                            //alert("数据：" + data + "\n状态：" + status);
                        }
                        else {
                            $("#txt_FrameNO").val(data);
                        }
                    });

                });


            });
     </script>
    
    
    
    <style type="text/css">
        .style6
        {
            width: 37px;
        }
        .style7
        {
            text-align: right;
        }
        .style8
        {
            width: 155px;
            text-align: right;
        }
        .style10
        {
        	 width: 150px;
            text-align: left;
        }
        .style11
        {
            text-align: left;
            width: 327px;
        }
        .style12
        {
            text-align: left;
        }
        .style15
        {
            width: 207px;
        }
        .style17
        {
            width: 245px;
            text-align: right;
        }
        .style18
        {
            width: 207px;
            text-align: right;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server" enctype="multipart/form-data">
    <div  id="SubMain">
    
        <table style="width:750px; font-size:12px; float:left; margin-top:10px;">
            <tr>
                <td class="style17">
                    <asp:Label ID="Label6" runat="server" Text="Label" Font-Bold="True">类型</asp:Label></td>
                <td class="style10">
                    <asp:DropDownList ID="ddl_Type" runat="server">
                        <asp:ListItem>交强险</asp:ListItem>
                        <asp:ListItem>车损险</asp:ListItem>
                        <asp:ListItem>第三者险</asp:ListItem>
                        <asp:ListItem>附加险</asp:ListItem>
                        <asp:ListItem>车船使用税</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    &nbsp;</td>
                <td class="style8">
                    <asp:Label ID="Label7" runat="server" Text="保费" Font-Bold="True"></asp:Label>
                    </td>
                <td class="style10">
                    <asp:TextBox ID="txt_InsFee" runat="server"
                        Width="106px" ></asp:TextBox>
                </td>
                <td class="style6">
                    &nbsp;</td>
                <td class="style18">
                    <asp:Label ID="Label8" runat="server" Text="保额" Font-Bold="True"></asp:Label>
                </td>
                <td class="style11">
                    <asp:TextBox ID="txt_InsQuota" runat="server" style="margin-left: 0px" 
                        Width="64px"></asp:TextBox>
                </td>
                <td>
                    <asp:Button ID="btn_Add" runat="server" Text="添加" onclick="btn_Add_Click" 
                        CausesValidation="False" />
                </td>
            </tr>
            <tr>
                <td class="style12" colspan="9" style=" border-color:Blue; border-style:solid; border-width:2px;">
                    <asp:GridView ID="GridView1" runat="server" Width="100%" 
                        AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" 
                        GridLines="None" style="text-align: center" SkinID="11">
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <Columns>
                            <asp:BoundField DataField="InsType" HeaderText="类型" />
                            <asp:BoundField DataField="InsFee" HeaderText="保费" />
                            <asp:BoundField DataField="InsQuota" HeaderText="保额" />
                            <asp:TemplateField>
    
                         <ItemStyle Width="40px" />
                        </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                        <EmptyDataTemplate>
                            请选择要购买的保单！
                        </EmptyDataTemplate>
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#999999" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:GridView>
                </td>
            </tr>
            <tr>
                <td class="style17">
                    &nbsp;</td>
                <td class="style10">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td class="style8">
                    &nbsp;</td>
                <td class="style10">
                    &nbsp;</td>
                <td class="style6">
                    &nbsp;</td>
                <td class="style18">
                    &nbsp;</td>
                <td class="style11">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style17">
                    <asp:Label ID="Label1" runat="server" Text="Label" Font-Bold="True">车牌号</asp:Label></td>
                <td class="style10">
                    <asp:TextBox ID="txt_VehicleID" runat="server" Width="107px"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
                <td class="style8">
                    <asp:Label ID="Label10" runat="server" Text="Label" Font-Bold="True">车架号</asp:Label>
                    </td>
                <td class="style10">
                    <asp:TextBox ID="txt_FrameNO" runat="server" Width="107px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txt_FrameNO" ErrorMessage="*"></asp:RequiredFieldValidator>
                </td>
                <td class="style6">
                    &nbsp;</td>
                <td class="style18">
                    <asp:Label ID="Label9" runat="server" Text="购买渠道" Font-Bold="True"></asp:Label>
                </td>
                <td class="style11">
                    <asp:TextBox ID="txt_BuyChannel" runat="server" 
                        Width="106px" ></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                        ControlToValidate="txt_BuyChannel" ErrorMessage="*"></asp:RequiredFieldValidator>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style7" colspan="9">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style17">
                    <asp:Label ID="Label2" runat="server" Text="购买日期" Font-Bold="True"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txt_BuyDate" runat="server" onClick="WdatePicker()"  Width="106px" ></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                        ControlToValidate="txt_BuyDate" ErrorMessage="*"></asp:RequiredFieldValidator>
                    </td>
                <td>
                    &nbsp;</td>
                <td class="style8">
                    <asp:Label ID="Label3" runat="server" Text="到期日期" Font-Bold="True"></asp:Label>
                </td>
                <td class="style11">
                    <asp:TextBox ID="txt_OutDate" runat="server" style="margin-left: 0px"  onClick="WdatePicker()" 
                        Width="64px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="txt_OutDate" ErrorMessage="*"></asp:RequiredFieldValidator>
                </td>
                <td class="style6">
                    &nbsp;</td>
                <td class="style15">
                    <asp:Label ID="Label5" runat="server" Text="购买费用" Font-Bold="True"></asp:Label>
                    </td>
                <td class="style10">
                    <asp:TextBox ID="txt_BuyFeeSum" runat="server" Width="107px" ReadOnly="True">0</asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                        ControlToValidate="txt_BuyFeeSum" ErrorMessage="*"></asp:RequiredFieldValidator>
                </td>
                <td class="style10">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style17">
                    &nbsp;</td>
                <td class="style10">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td class="style8">
                    &nbsp;</td>
                <td class="style10">
                    &nbsp;</td>
                <td class="style6">
                    &nbsp;</td>
                <td class="style18">
                    &nbsp;</td>
                <td class="style11">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style17">
                    &nbsp;</td>
                <td class="style10">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td class="style8">
                    <asp:Button ID="btn_Sure" runat="server" Text="确认" Width="76px" 
                        onclick="btn_Sure_Click" style="height: 26px" />
                </td>
                <td class="style10">
                    &nbsp;</td>
                <td class="style6">
                    &nbsp;</td>
                <td class="style18">
                    &nbsp;</td>
                <td class="style11">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
        <br />
    
    </div>
    </form>
</body>
</html>
